package com.itbupt.infrastructure.persistent.dao;

import com.itbupt.infrastructure.persistent.po.StrategyAward;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author dingchang
 * @Date 2025/3/15 20:28
 * @Description: 抽奖策略奖品明细配置 - 概率、规则 DAO
 */

@Mapper
public interface IStrategyAwardDao {

    // 从数据库查询策略ID
    List<StrategyAward> queryStrategyAwardList();

    /**
     * 从数据库中查询策略奖品信息明细
     * @param strategyId 策略ID
     * @return List<StrategyAward>
     */
    List<StrategyAward> queryStrategyAwardListByStrategyId(Long strategyId);

    String queryStrategyAwardRuleModels(StrategyAward strategyAward);

    /**
     * 更新奖品库存消耗
     * @param strategyAward 策略奖品
     */
    void updateStrategyAwardStock(StrategyAward strategyAward);

    StrategyAward queryStrategyAward(StrategyAward strategyAwardReq);

}
